package jmine.tec.datadigester.positional.meta;

import java.beans.PropertyDescriptor;

/**
 * @author lundberg
 */
public class PositionalStringFieldMetadata extends PositionalFieldMetadata {

    private final boolean shouldTrim;

    /**
     * @param property property
     * @param description description
     * @param start start
     * @param size size
     * @param shouldTrim shouldTrim
     */
    public PositionalStringFieldMetadata(PropertyDescriptor property, String description, int start, int size, boolean shouldTrim) {
        super(property, description, start, size);
        this.shouldTrim = shouldTrim;
    }

    /**
     * @return shouldTrim
     */
    public boolean shouldTrim() {
        return this.shouldTrim;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected Class<?> getFieldType() {
        return String.class;
    }
}
